
#include <occi.h>
#include <occiCommon.h>
#include <occiData.h>
#include <occiObjects.h>
#include <occiAQ.h>
#include <occiControl.h>


using namespace oracle::occi;


class dbAccessor
{
public:
    dbAccessor();
    ~dbAccessor();

    bool Connect_DB();
    void Disconn_DB();
    bool ExecuteUpdate(const char* sql);
    ResultSet* ExecuteQuery(const char* sql);
    void ClearQuery(ResultSet* set);

    void Init(const char* dbName,const char* dbUser,const char* dbPass);
    void SetDate(unsigned int paramIndex, time_t timeVal);

private:
    Environment* m_env;
    Connection* m_conn;
    Statement* m_stmt;
    const char *m_szUser;
    const char *m_szPassword;
    const char *m_szDbName;
};